package com.souche.employment;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * ApplicationContextHolder created at 2017/9/7 下午9:45
 * Ray [email:rayinhangzhou@126.com]
 * Revision History
 * Date            Programmer                   Notes
 * ----------------------------------------------------------
 **/

public class ApplicationContextHolder implements ApplicationContextAware {
    private static ApplicationContext context;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        context = applicationContext;
    }

    public static ApplicationContext getContext() {
        return context;
    }
}